
package matchingPLS2TF;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import pack1.PLS;


public class Main2FlickrData3 {

	public static void main (String [] args) throws Exception{
		  
		List<PLS> pls = new ArrayList<PLS>();
		FlickrUserMethods.loadPLSUser(pls, "C:\\Users\\Alket\\codeindigo\\DataTel\\test2.txt");
		
		Collections.sort(pls);
		
	    Map<PLS, List<PLSUser>>	data = new HashMap<PLS, List<PLSUser>>();
	   
		List<PLSUser> pls_user ;
		
		for (PLS p:pls) {	
				
			 double fl_lat = p.lat;
		     double fl_lon = p.lon;
			 long ts_pls_user = p.time;
			 
			 List<PLSUser> plist = data.get(p);
			    
			    if(plist==null){
				  plist = new ArrayList<PLSUser>();
				  plist = FlickrUserMethods.ts_pls_list4FlickrUser("C:/DATA/data/mese/AllData",fl_lat, fl_lon, ts_pls_user);
				  data.put(p, plist);
			    }
			    else{
			    plist = FlickrUserMethods.ts_pls_list4FlickrUser("C:/DATA/data/mese/AllData",fl_lat, fl_lon, ts_pls_user);
			    data.put(p, plist);
			    }
			    
				
				
//				if(!(username_i.equals(username_i1))){
//					FlickrUserMethods.print2("Twitter2PLSResults_"+username_i+", "+i+"_10min.txt", data);
//					System.out.println("stampo file per "+username_i);
//					Collections.sort(pls_user);
//					FlickrUserMethods.print("Match2_"+username_i+", "+i+"_10min.txt", pls_user);
//					System.out.println("stampo file esclusione per "+username_i);
//					
//					data = new HashMap<PLS, List<PLSUser>>();
//					excluded = new HashSet<String>();
//				}
			
		
		
		
		} 
		FlickrUserMethods.print2("FinalResults 10min.txt", data);
		
    }
}
